package org.example.core.service;

import org.example.core.entity.SupperEntity;
import org.example.core.model.SupperModel;
import org.example.core.mysql.SearchPageResult;
import org.example.core.mysql.Where;

import java.util.List;

    public interface BaseService<I, M extends SupperModel<I>, E extends SupperEntity<I>> {
    List<M> searchAll();

    M getById(I id);

    List<M> search(Where where);

    int update(M model);

    int add(M model);

    int delete(I id);

    M searchOne(Where where);

    SearchPageResult<M> searchPage(int page, int limit);

    int count(Where where);


}
